package edu.gatech.cc.liam.core.rl.models;

import java.util.ArrayList;

public class NumberedAction implements Action {

	private static final long serialVersionUID = -5470629777719514291L;
	
	public int theNumber;

	public NumberedAction(int theNumber) {
		super();
		this.theNumber = theNumber;
	}

	public static ArrayList<NumberedAction> makeJointNumberedAction(Integer ... Actions) {
		ArrayList<NumberedAction> theJoint = new ArrayList<NumberedAction>();
		for(int i=0; i<Actions.length; i++) {
			theJoint.add(new NumberedAction(Actions[i]));
		}
		return theJoint;
	}
	
	@Override
	public String toString() {
		return "Action-" + this.theNumber;
	}

	@Override
	public boolean equals(Object obj) {
		if (obj == null || !getClass().equals(obj.getClass())) {
	        return false;
	     } else {
	    	 return this.theNumber == ((NumberedAction)obj).theNumber;
	     }
	}
	@Override
	public int hashCode() {
		return theNumber;
	}
}
